from flask_shop import db
from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash

from ..BaseBodel import BaseModel

class User(db.Model,BaseModel):
    __tablename__ = 't_users'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    name = db.Column(db.String(32), unique=True,nullable=False)

    def to_dict(self):
        return {
            "id":self.id,
            "name":self.name
        }